import pandas as pd
import numpy as np
# import IPython
# import IPython.display
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
# import os

def main():
    df = pd.read_csv("./csv/source.csv")
    df = df.drop(df.columns[[0]], axis=1)
    mean = df.mean(axis=0)
    std = df.std(axis=0)
    df_std = (df - mean) / std
    df_std = df_std.melt(var_name='Column', value_name='Normalized')

    # 将列名转换为 Unicode 字符串
    # df_std.columns = [col.encode("utf-8").decode("utf-8") for col in df_std.columns]
    plt.rcParams["font.family"]="STSong" 

    plt.figure(figsize=(12, 6))
    ax = sns.violinplot(x='Column', y='Normalized', data=df_std)
    ax.set_xticklabels(df.keys(), rotation=90)
    plt.show()


if __name__ == '__main__':
    main()
